import request from '@/utils/request'

// 登录
export function login(data) {
  return request({
    url: '/user/find',
    method: 'get',
    params: {
      phone: data.phone,
      password: data.password,
    },
  })
}

// 注册
export function register(data) {
  console.log(data)
  return request({
    url: '/user',
    method: 'post',
    data,
  })
}

// 忘记密码
export function forget(data) {
  return request({
    url: '/user',
    method: 'put',
    data,
  })
}
